home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <stdlib.h>
- #include <errno.h>
-
- #include <proto/exec.h>
- #include <proto/dos.h>
-
- /************************************************************************/
-
- int fclose(FILE *Stream)
-
- {
- int Result;
-
- Result=0;
- Remove((struct Node *)&Stream->Node);
- if (Stream->Flags.Close)
- {
- if (!Close(Stream->Filehandle))
- {
- errno=IoErr();
- Result=EOF;
- }
- }
- if (Stream->Flags.Free)
- {
- free(Stream);
- }
- return Result;
- }
-